package org.vse.aha.gui.actions;

import java.awt.event.ActionEvent;
import java.awt.event.ActionListener;
import org.openide.awt.ActionID;
import org.openide.awt.ActionReference;
import org.openide.awt.ActionReferences;
import org.openide.awt.ActionRegistration;
import org.openide.util.NbBundle.Messages;
import org.openide.windows.WindowManager;
import org.vse.aha.gui.nodes.QuoteNode;

@ActionID(category = "VNode",
id = "org.vse.aha.gui.actions.QuoteDetailAction")
@ActionRegistration(iconBase = "org/vse/aha/gui/actions/detailIcon16.png",
displayName = "#CTL_QuoteDetailAction")
@ActionReferences({
  @ActionReference(path = "Menu/File", position = 1300),
  @ActionReference(path = "Toolbars/File", position = 300)
})
@Messages("CTL_QuoteDetailAction=Detail výroku")
public final class QuoteDetailAction implements ActionListener {

  private final QuoteNode context;

  public QuoteDetailAction(QuoteNode context) {
    this.context = context;
  }

  @Override
  public void actionPerformed(ActionEvent ev) {
    WindowManager.getDefault().findTopComponent("DetailVyrokuTopComponent").open();
  }
}
